package com.example.login.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 首页控制器
 */
@Controller
public class IndexController {

    /**
     * 处理根路径请求
     */
    @GetMapping("/")
    @ResponseBody
    public String index() {
        return "登录模块系统已成功启动，API接口可正常访问。<br><br>" +
               "可用的API接口：<br>" +
               "- POST /api/auth/register - 用户注册<br>" +
               "- POST /api/auth/login - 账号密码登录<br>" +
               "- POST /api/auth/sms/send - 发送短信验证码<br>" +
               "- POST /api/auth/login/sms - 短信验证码登录<br>" +
               "- GET /api/auth/login-check - 登录检查<br>" +
               "- GET /api/user/check - 检查用户是否存在";
    }
} 